﻿using Dict.Config;
using System;
using System.Collections.Generic;
using Dict.DataModel;

namespace Battle.Engine.LogicModel
{
    public class BuffOfRandom : Buff {
        string[] buffs;
        Buff randomBuff;
        public override Buff Clone()
        {
            if (this.buffs == null)
            {
                this.buffs = param.Split(',');
            }
            //处理随机，将原随机buff随机出实际buff进行克隆
            int i = this.engineData.random.Range(0, this.buffs.Length - 1);
            if (i >= 0)
            {
                this.randomBuff = FBuffFactory.CreateBuff(this.buffs[i], this.engineData);
            }
            
            return this.randomBuff.Clone();
        }
        public override void Init(TableBuff tableBuff, EngineData engineData)
        {
            base.Init(tableBuff, engineData);


        }

        public override void LoadBuff0()
        {

        }

        public override void UnloadBuff0()
        {
            
        }

        public override void Effect()
        {
            
        }

        public override void UnEffect()
        {
            
        }


    }
}
